package com.ruoyi.recycle.dto;

import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@Data
@Accessors(chain = true)
@NoArgsConstructor
public class MerchantBillRecordQueryDTO implements Serializable {
    private static final long serialVersionUID = 5673040539798483088L;
    @ApiModelProperty(name = "account", value = "账号")
    private String account;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(name = "searchTimeBegin", value = "搜索开始时间")
    private Date searchTimeBegin;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(name = "searchTimeEnd", value = "搜索结束时间")
    private Date searchTimeEnd;
    @ApiModelProperty(name = "type", value = "交易类型,(0.充值，1.分红，2.回收订单，3.提现)")
    private String type;

    public void setSearchTimeEnd(Date searchEnd) {
        this.searchTimeEnd = DateUtil.offsetSecond(searchEnd, 86399).toJdkDate();

    }
}
